﻿<%@ Page Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="DesvioOrigenSap.aspx.cs" Inherits="WebAppPlanProduccion.App.DesvioOrigenSap" %>

<%@ Register Assembly="Web.Framework" Namespace="Web.Framework.Controls" TagPrefix="planprod" %>
<asp:Content ID="HeaderContent" ContentPlaceHolderID="HeadContent" runat="server">   
    <link href="/Styles/PlanProdCtrl.css" rel="stylesheet" type="text/css" />
    <link href="/Styles/Desvios.css" rel="stylesheet" type="text/css" />    
    <script src="/Scripts/PP/DesvioIndividual.js" type="text/javascript"></script>     
    <script src="/Scripts/PlanProdDetalleProductoCtrl.js" type="text/javascript"></script>   
</asp:Content>
<asp:Content ID="BodyContent" ContentPlaceHolderID="MainContent" runat="server">
    <h2>
        Desv&iacute;o
    </h2>
    <div class="editionContainerFilter">
        <p>
            <span class="title">Id de Plan:</span>
            <asp:TextBox ID="txtPlanProduccionId" runat="server" CssClass="inputs readonly" ReadOnly="true"
                ClientIDMode="Static"></asp:TextBox>
        </p>
        <p>
            <span class="title secondColumn">Destino:</span>
            <asp:TextBox ID="txtDestino" ClientIDMode="Static" runat="server" CssClass="inputs readonly"
                ReadOnly="true"></asp:TextBox>
        </p>
        <div class="clear">
        </div>
        <p>
            <span class="title">Temporada:</span>
            <asp:TextBox ID="txtTemporada" runat="server" CssClass="inputs readonly" ReadOnly="true"></asp:TextBox>
        </p>
        <p>
            <span class="title secondColumn">Proveedor:</span>
            <asp:TextBox ID="txtProveedor" ClientIDMode="Static" runat="server" CssClass="inputs readonly"
                ReadOnly="true"></asp:TextBox>
        </p>
        <div class="clear">
        </div>
        <p>
            <span class="title">Id de Desv&iacute;o:</span>
            <asp:TextBox ID="txtDesvioId" runat="server" CssClass="inputs readonly" ReadOnly="true"
                ClientIDMode="Static"></asp:TextBox>
        </p>
        <p>
            <span class="title secondColumn">Fecha Creación:</span>
            <asp:TextBox ID="txtFechaCreacion" ClientIDMode="Static" runat="server" CssClass="inputs readonly"
                ReadOnly="true"></asp:TextBox>
        </p>
        <div class="clear">
        </div>
        <p>
            <span class="title">Tipo de Desv&iacute;o:</span>
            <asp:DropDownList ID="cboTipoDesvio" runat="server" CssClass="cbo" ClientIDMode="Static">
            </asp:DropDownList>
        </p>
        <p>
            <span class="title secondColumn">Usuario Creación:</span>
            <asp:TextBox ID="txtUSuarioCreacion" ClientIDMode="Static" runat="server" CssClass="inputs readonly"
                ReadOnly="true"></asp:TextBox>
        </p>
        <div class="clear">
        </div>
        <p>
            <asp:HiddenField ID="hidEstado" runat="server" />
            <span class="title">Estado:</span>
            <asp:TextBox ID="txtEstado" ClientIDMode="Static" runat="server" CssClass="inputs readonly"
                ReadOnly="true"></asp:TextBox>
        </p>
        <p>
            <span class="title secondColumn">Fecha de Aprobaci&oacute;n:</span>
            <asp:TextBox ID="txtFechaAprobacion" ClientIDMode="Static" runat="server" CssClass="inputs readonly"
                ReadOnly="true"></asp:TextBox>
        </p>
        <div class="clear">
        </div>
        <p>
            <span class="title">Causa:</span>
            <asp:DropDownList ID="cboDesvioCausa" runat="server" CssClass="cbo" ClientIDMode="Static">
            </asp:DropDownList>
        </p>
        <p>
            <span class="title secondColumn">Usuario Aprobador:</span>
            <asp:TextBox ID="txtUsuarioAprobador" ClientIDMode="Static" runat="server" CssClass="inputs readonly"
                ReadOnly="true"></asp:TextBox>
        </p>
        <div class="clear">
        </div>
        <p>
            <span class="title">Art&iacute;culo:</span>
            <asp:TextBox ID="txtProductoArticulo" ClientIDMode="Static" runat="server" CssClass="inputs readonly"
                ReadOnly="true"></asp:TextBox>
        </p>
        <p>
            <span class="title secondColumn">Color:</span>
            <asp:TextBox ID="txtProductoColor" ClientIDMode="Static" runat="server" CssClass="inputs readonly"
                ReadOnly="true"></asp:TextBox>
        </p>
        <div class="clear">
        </div>
    </div>
    <h2>
        Situaci&oacute;n Actual
    </h2>
    <asp:Panel ID="pnlActual" CssClass="editionContainerForGrid" runat="server">
    <planprod:PlanProdDetalleProductoCtrl ID="PlanProdDetalleActual" runat="server" InputsReadOnly="true" ClientIDMode="Static"    />
    

    </asp:Panel>
    
    <h2>
        Cambios
    </h2>
    <asp:Panel ID="pnlCambios" CssClass="editionContainerForGrid" runat="server">

    <planprod:PlanProdDetalleProductoCtrl ID="PlanProdDetalleCambios" runat="server" ClientIDMode="Static" InputsReadOnly="true"  />
   

    </asp:Panel>
    <br />
    <asp:Panel ID="pnlOrigenEnSap" runat="server">        
    <h2>
        Origen en SAP
    </h2>
      <asp:Panel ID="pnlResults" CssClass="editionContainerForGrid" runat="server">
        <asp:GridView ID="Grid" runat="server" CellPadding="4" ForeColor="#333333"
            GridLines="None" AutoGenerateColumns="False" DataKeyNames="Id" Width="100%" AllowPaging="False"
            OnPageIndexChanging="Grid_PageIndexChanging" OnRowCommand="Grid_RowCommand"
            OnRowDataBound="Grid_RowDataBound">
            <AlternatingRowStyle BackColor="White" />
            <Columns>                   
                <asp:BoundField DataField="Id" HeaderText="Id">
                    <HeaderStyle HorizontalAlign="Left" />
                </asp:BoundField>
                <asp:BoundField DataField="Fecha" HeaderText="Fecha" DataFormatString="{0:dd/MM/yyyy HH:mm:ss}">
                    <HeaderStyle HorizontalAlign="Left" />
                </asp:BoundField>
                 <asp:BoundField DataField="NumeroSemana" HeaderText="Sem" >
                    <HeaderStyle HorizontalAlign="Left" />
                </asp:BoundField>
                <asp:BoundField DataField="Destino" HeaderText="Destino">
                    <HeaderStyle HorizontalAlign="Left" />
                </asp:BoundField>
                <asp:BoundField DataField="Producto" HeaderText="Producto">
                    <HeaderStyle HorizontalAlign="Left" />
                </asp:BoundField>
                <asp:BoundField DataField="ProductoSegunda" HeaderText="Producto Segunda">
                    <HeaderStyle HorizontalAlign="Left" />
                </asp:BoundField>
                <asp:BoundField DataField="Tipo" HeaderText="Cod">
                    <HeaderStyle HorizontalAlign="Left" />
                </asp:BoundField>
                  <asp:BoundField DataField="TipoDescripcion" HeaderText="Tipo">
                    <HeaderStyle HorizontalAlign="Left" />
                </asp:BoundField>
                <asp:BoundField DataField="Cantidad" HeaderText="Cant">
                    <HeaderStyle HorizontalAlign="Left" />
                </asp:BoundField>
                <asp:BoundField DataField="MotivoDesvio" HeaderText="Mot Des">
                    <HeaderStyle HorizontalAlign="Left" />
                </asp:BoundField>
                  <asp:BoundField DataField="FechaNueva" HeaderText="Fecha Nueva" DataFormatString="{0:dd/MM/yyyy}">
                    <HeaderStyle HorizontalAlign="Left" />
                </asp:BoundField>
                  <asp:BoundField DataField="Temporada" HeaderText="Temp">
                    <HeaderStyle HorizontalAlign="Left" />
                </asp:BoundField>
                  <asp:BoundField DataField="OT" HeaderText="OT">
                    <HeaderStyle HorizontalAlign="Left" />
                </asp:BoundField>
                  <asp:BoundField DataField="Paquete" HeaderText="Paq">
                    <HeaderStyle HorizontalAlign="Left" />
                </asp:BoundField>
                 <asp:BoundField DataField="Cod_Ope_Sap" HeaderText="SAP">
                    <HeaderStyle HorizontalAlign="Left" />
                </asp:BoundField>
            </Columns>
            <EditRowStyle BackColor="#2461BF" />
            <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
            <HeaderStyle BackColor="#4b6c9e" Font-Bold="True" ForeColor="White" HorizontalAlign="Left" />
            <PagerStyle BackColor="#4b6c9e" ForeColor="White" HorizontalAlign="Center" />
            <RowStyle BackColor="#EFF3FB" />
            <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
            <SortedAscendingCellStyle BackColor="#F5F7FB" />
            <SortedAscendingHeaderStyle BackColor="#6D95E1" />
            <SortedDescendingCellStyle BackColor="#E9EBEF" />
            <SortedDescendingHeaderStyle BackColor="#4870BE" />
        </asp:GridView>
    </asp:Panel>   
    </asp:Panel>         
       
    <script type='text/javascript'>

        $(document).ready(function () {

            if (!window.AppCommonObj) {
                window.AppCommonObj = new AppCommon();
            }        

            document.DirtyCheck = new DirtyCheck();
            document.DirtyCheck.loadControlState();

            AppCommonObj.ConfirmMovePage();      

        });
    </script>

</asp:Content>
